package com.dao;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Connection;
import com.utils.DBUtil;

public class AddressaddDao {
	
	public void add(String xm,String ph,String cs,String dz,String bz){
		Connection connection=null;
        PreparedStatement statement = null;
        try {
        	 connection = DBUtil.getConnection();
            String sql = "insert into three_user(name,phone,city,address,remark) values (?,?,?,?,?)";
            statement = connection.prepareStatement(sql ); 
            statement.setString(1,xm);
            statement.setString(2,ph);
            statement.setString(3,cs);
            statement.setString(4,dz);
            statement.setString(5,bz);
            statement.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            DBUtil.free(connection,statement,null);
        }
    }
}
